<?php	
	session_start();
	include("lib/db/mysqlDatabase.php");
	include("lib/inc_session.php");
	include("lib/inc_menu.php");
	include("lib/inc_time.php");
	include("lib/inc_tournament.php");
	include("lib/inc_replace.php");
	include("lib/inc_location.php");
	include("lib/inc_complaints.php");
	include("lib/inc_configuration.php");
	include("lib/inc_tasks.php");
	include("lib/inc_linker.php");
	include("lib/inc_image.php");
	include("lib/inc_karma.php");
	include("lib/inc_notifications.php");
	include("lib/inc_stats.php");
	
	error_reporting(E_ERROR | E_WARNING | E_PARSE);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>PES6J Tournament</title>
	<link type="text/css" rel="stylesheet" href="style.css" media="screen" charset="utf-8" />
	<script type="text/javascript" src="js.js"></script>
</head>
<body>	
	<div id="header">
		<div id="logo"></div>
		<div id="header-login-text">
		<?php processLogin(); ?>
		</div>
	</div>
	<div id="menu">
	<?php mostrarMenu();?>
	</div>
		<?php 
			if(!isset($_SESSION["isNew"])){
				include("sessionNoPlayer.php");
			}else if($_SESSION["isNew"] == 1){
				include("sessionNewPlayer.php");
			}else if($_SESSION["isValidMail"] == 0){
				include("invalidMail.php");
			}else{
				$pagina = REPLACE_Injection($_GET["s"]);
				if($pagina == ""){
					$pagina = "tournaments.php";
				}else{
					if(file_exists($pagina.".php"))
						$pagina = $pagina.".php";
					else
						$pagina = "tournaments.php";
				}				
				include($pagina);
			}
		?>
</body>